﻿#region Copyright
/* Product of DTL Software
 * Product Name : Support Memmory
 * Author : dinhtienlam.spkt@gmail.com
 * About: Developer of DTL Software
 * Contact : 0966 330 237
 */
#endregion

#region Using Default
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
#endregion

#region Using MVCSharp
using Lamdt.ModuleLayer;
using Lamdt.MVCSharp.Core;
using Lamdt.MVCSharp.Core.Views;
using Lamdt.MVCSharp.Core.Configuration.Views;
#endregion

namespace Lamdt.LogicLayer
{
    public class dtlBaseController<TTask, TIView> : ControllerBase<TTask, TIView>
        where TTask : dtlBaseTask
        where TIView : class, dtlIBaseView
    {
        #region Documentation
        /// <summary>
        /// Open next window in Lamdt.MVCSharp.
        /// </summary>
        /// <param name="ViewName">View name of destination windows</param> 
        #endregion
        public virtual void Navigate(string ViewName)
        {
            Task.Navigator.NavigateDirectly(ViewName);
        }

        #region Documentation
        /// <summary>
        /// Open window new window with parameter.
        /// </summary>
        /// <param name="ViewName">View name of destination window.</param>
        /// <param name="paras">The parameter input for new window.</param> 
        #endregion
        public virtual void Navigate(string ViewName, object[] paras)
        {
            Task.Navigator.NavigateDirectly(ViewName, paras);
        }

        #region Documentation
        /// <summary>
        /// Function get string with culture.
        /// </summary>
        /// <param name="keyWord">Keyword of label.</param>
        /// <returns>String of keyword in culture.</returns> 
        #endregion
        public string GetText(string keyWord)
        {
            return Task.GetText(keyWord);
        }
    }
}
